<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        div {
            width: 100%;
            height: 70px;
            background-color: pink;
            font-size: 24px;
            line-height: 70px;
            text-align: center;
        }

        div i {
            position: absolute;
            top: 7px;
            right: 3px;
            line-height: 0;
            cursor: pointer;
        }
    </style>
</head>

<body>
    <div>
        京东广告
        <i class="close-btn">×</i>
    </div>
    <script>
        var box = document.querySelector('div');
        var btn = document.querySelector('i');
        btn.onclick = function () {
            box.style.display = 'none';
        }
    </script>
</body>

</html>